package com.tgr.shortLink.admin.common.convention.exception;

import com.tgr.shortLink.admin.common.convention.errorCode.BaseErrorCode;
import com.tgr.shortLink.admin.common.convention.errorCode.IErrorCode;

/**
 * 描述：客户端异常
 * 作者：小陶不慌张
 * 文件：ClientException
 * 日期：2023/12/22 18:56
 */

public class ClientException extends AbstractException{
    public ClientException(IErrorCode errorCode){
        this(null, null ,errorCode);
    }
     public ClientException(String message){
        this(message,null, BaseErrorCode.CLIENT_ERROR);
     }
     public ClientException(String message, IErrorCode errorCode){
        this(message,null,errorCode);
     }
     public ClientException(String message,Throwable throwable,IErrorCode errorCode){
        super(message,throwable,errorCode);
     }

     @Override
     public String toString(){
        return "ClientException{" +
                "code='"+ errorCode+"',"+
                "message='"+errorMessage+"'"+
                "}";
     }
}
